package com.example.test_demo.async;

import org.springframework.stereotype.Component;

/**
 * @program: test_demo
 * @description: 测试CompletableFuture
 * @author: yanghua
 * @create: 2021-09-22 09:53
 **/
@Component
public class CompletableFutureDemo {
    public String futureItem1(){

        try {
            Thread.sleep(10000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "futureItem1 one";
    }
    public String futureItem2(){
        return "futureItem2 two";
    }
}
